import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', name: 'Home', component: (resolve) => { require(['@/views/Home'], resolve) } },
    { path: '/icons', name: 'Icon', component: (resolve) => { require(['@/views/Icon'], resolve) } },
    { path: '/dialog/loading', name: 'DialogLoading', component: (resolve) => { require(['@/views/Dialog/Loading'], resolve) } },
    { path: '/dialog/toast', name: 'DialogToast', component: (resolve) => { require(['@/views/Dialog/Toast'], resolve) } },
    { path: '/dialog/alert', name: 'DialogAlert', component: (resolve) => { require(['@/views/Dialog/Alert'], resolve) } },
    { path: '/dialog/confirm', name: 'DialogConfirm', component: (resolve) => { require(['@/views/Dialog/Confirm'], resolve) } },
    { path: '/dialog/actionSheet', name: 'DialogActionSheet', component: (resolve) => { require(['@/views/Dialog/ActionSheet'], resolve) } },
    { path: '/scrollSection', name: 'ScrollSection', component: (resolve) => { require(['@/views/ScrollSection/Index'], resolve) } },
    // interact
    { path: '/popup', name: 'Popup', component: (resolve) => { require(['@/views/Popup/Index'], resolve) } },
    // components
    { path: '/button', name: 'Button', component: (resolve) => { require(['@/views/Button/Index'], resolve) } },
    { path: '/switch', name: 'Switch', component: (resolve) => { require(['@/views/Switch/Index'], resolve) } },
    { path: '/navbar', name: 'Navbar', component: (resolve) => { require(['@/views/Navbar/Index'], resolve) } },
    { path: '/input', name: 'Input', component: (resolve) => { require(['@/views/Input/Index'], resolve) } },
    { path: '/textarea', name: 'Textarea', component: (resolve) => { require(['@/views/Textarea/Index'], resolve) } },
    { path: '/search', name: 'Search', component: (resolve) => { require(['@/views/Search/Index'], resolve) } },
    { path: '/list', name: 'List', component: (resolve) => { require(['@/views/List/Index'], resolve) } },
    { path: '/rollNotice', name: 'RollNotice', component: (resolve) => { require(['@/views/RollNotice/Index'], resolve) } },
    { path: '/counter', name: 'Counter', component: (resolve) => { require(['@/views/Counter/Index'], resolve) } },
    { path: '/slider', name: 'Slider', component: (resolve) => { require(['@/views/Slider/Index'], resolve) } }
  ]
})
